package util.thread.creatthread;


import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 继承 Thread 方式创建线程
 *
 * @author: Lidong
 * @time: 2020/8/6 20:48
 **/
public class CreateThreadByThreadTest {

    private static final Logger logger = LoggerFactory.getLogger(CreateThreadByThreadTest.class);

    @Test
    public void test() {
        new TestExtendsThread().start();
    }

    class TestExtendsThread extends Thread {
        @Override
        public void run() {
            logger.info("我是Test1ExtendsThread的线程！");
        }
    }
}
